package com.mobyd.mweb.story.controller;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.mobyd.mweb.common.util.StringUtil;
import com.mobyd.mweb.common.util.paginate.Paginate;
import com.mobyd.mweb.common.util.paginate.PaginatePrepare;
import com.mobyd.mweb.story.service.StoryService;

@Controller
@RequestMapping(value="story")
public class StoryController {

	private static final Logger log = LoggerFactory.getLogger(StoryController.class);


	@Autowired
	private StoryService storyService;
	
	@Autowired
	private PaginatePrepare paginatePrepare;	
	
	/**
	 * 북노트목록
	 * 
	 * @param paramMap
	 * @param modelMap
	 * @throws Exception
	 */
	@RequestMapping(value={"noteList.dp", "noteList.json"})
	public void noteList(@RequestParam Map<String, Object> paramMap, ModelMap modelMap) throws Exception {
		
		log.debug("***************************************************************************************");
		log.debug("***  paramMap : {}", paramMap);
		log.debug("***************************************************************************************");

		modelMap.addAttribute("paramMap", paramMap);
	
		
		/*** Service단 수행 ***/
		modelMap.addAttribute("rs", storyService.noteList(paramMap));					
	}
	
}
